# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gmetadom
pkgver=0.2.6
pkgrel=10
pkgdesc="C++ bindings for GDome2 DOM implementation"
arch=('x86_64')
url="http://gmetadom.sourceforge.net/"
license=('LGPL')
depends=('gdome2')
makedepends=('pkgconfig' 'ocaml-findlib' 'libxslt')
options=('!makeflags')
source=("https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz"
        'gmetadom-0.2.6-gcc43.patch')
sha256sums=('2f1e286dfceb7877f90c72de7e5e17a87d0e3f8121feff794a6f637bc1a6756a'
            '71d06b41cafcbca318d48d39c97e9f25873461828c7702541f721fd478dbbacf')

prepare() {
  cd $pkgname-$pkgver
  patch -Np1 -i ${srcdir}/gmetadom-0.2.6-gcc43.patch
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  export LDFLAGS=${LDFLAGS/,--as-needed}
  ./configure --prefix=/usr
  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR=${pkgdir}/ install
}
